package lp.xian.equipment.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 设备保养对象 lp_upkeep
 *
 * @author ruoyi
 * @date 2023-07-01
 */
@Data
public class Upkeep extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键递增 */
    private Integer upkeepId;

    /** 设备ID */
    @Excel(name = "设备ID")
    private Integer equipmentId;

    /** 设备附件Id */
    @Excel(name = "设备附件Id")
    private Integer adjunctId;

    /** 保养名称 */
    @Excel(name = "保养名称")
    private String upkeepName;

    /** 保养描述 */
    @Excel(name = "保养描述")
    private String description;

    /** 保养周期 */
    @Excel(name = "保养周期")
    private String upkeepPeriod;

    /** 注意事项 */
    @Excel(name = "注意事项")
    private String announcements;

    /** 保养内容 */
    @Excel(name = "保养内容")
    private String upkeepContent;

    /** 保养价格 */
    @Excel(name = "保养价格")
    private BigDecimal upkeepPrice;

    /** 审核状态 */
    @Excel(name = "审核状态")
    private Integer auditStatus;

    /** 审核意见 */
    @Excel(name = "审核意见")
    private String auditOpinion;

    /** 审核时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date auditTime;

    /** 审核人 */
    @Excel(name = "审核人")
    private String auditPerson;

    /** 审批时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "审批时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date approverTime;

    /** 审批意见 */
    @Excel(name = "审批意见")
    private String approverOpinion;

    /** 审批人 */
    @Excel(name = "审批人")
    private String approverPerson;

    /** 排序 */
    @Excel(name = "排序")
    private Integer sort;

    private Equipment equipment;
    private Adjunct adjunct;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("upkeepId", getUpkeepId())
                .append("equipmentId", getEquipmentId())
                .append("adjunctId", getAdjunctId())
                .append("upkeepName", getUpkeepName())
                .append("description", getDescription())
                .append("upkeepPeriod", getUpkeepPeriod())
                .append("announcements", getAnnouncements())
                .append("upkeepContent", getUpkeepContent())
                .append("upkeepPrice", getUpkeepPrice())
                .append("auditStatus", getAuditStatus())
                .append("auditOpinion", getAuditOpinion())
                .append("auditTime", getAuditTime())
                .append("auditPerson", getAuditPerson())
                .append("approverTime", getApproverTime())
                .append("approverOpinion", getApproverOpinion())
                .append("approverPerson", getApproverPerson())
                .append("sort", getSort())
                .append("remark", getRemark())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
